Method, system, and program for implementing a remote method call

ABSTRACT

Provided is a computer implemented method, system, and program for implementing for implementing a remote method call. Remote objects and at least one proxy object are generated, where each proxy object corresponds to one remote object. Data from the remote object is included into the proxy object. A call to a method on one proxy object is processed and the method is executed. The method is one of a plurality of methods, wherein at least one of the plurality of methods comprises a local method including code to perform method operations on the proxy object without going to the remote object and at least one other of the plurality of methods comprises a remote method including code to perform method operations on the remote object.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method, system, and program for method, system, and program for implementing a remote method call in a network environment including a client and server systems.

2. Description of the Related Art

The Java** Remote Method Invocation (RMI) protocol and other communication protocols, such as the Simple Object Access Protocol (SOAP), provides a framework in which objects on separate computers may communicate over a network. In the Java RMI framework, an object on a server is represented on a client system by a stub or proxy object. Applications running on the clients can call remote interfaces on the stub object that has the same set of remote interfaces defined by the remote object class. The stub object carries out the method call on the remote object. When a stub method is invoked, the stub object initiates a connection with the remote Java Virtual Machine (JVM) containing the remote object and transmits the parameters to the remote JVM using RMI interfaces. The stub object then receives the result of the method invocation and returns the values to the caller.

In the prior art, the caller on the client must include code to handle RMI exceptions that the stub object receives from the remote object and passes to the caller. RMI exceptions include any exceptions resulting from communication problems between the stub and the remote object as well as certain errors in the operation of the remote object reported as RMI exceptions, such as a divide by zero that occurs during the execution of the method on the remote object on the server. This requirement that the calls to the proxy object include “guarding” code to handle the RMI specific exceptions increases software development costs because every caller that invokes methods on the stub object must be additionally coded to handle RMI exceptions.

Further, client-server applications that make frequent calls to the stub objects on the client that require communication with the server may generate significant network traffic that may adversely effect network performance. Further details of the RMI protocol are described in the publication “Java Remote Method Invocation Specification,” Revision 1.7 (Copyright Sun Microsystems, Inc.

Applet programs also use the RMI framework. An applet is often launched from a server over the Internet and executes in a web browser program on the client. An applet can either be unsigned or signed. A signed applet is implemented in a Java archive (Jar) file having a signing certificate. When executing unsigned applets in the client, the RMI framework implemented in the client restricts the applet to only communicate with the server from which the applet was launched, and not any other servers. Thus, within the current RMI framework, unsigned applets can only communicate with the server from which the applet was downloaded and launched, and cannot communicate with any other servers or computers. Signed applets are allowed to communicate with servers other than the server from which they are downloaded and perform Input/Output (I/O) operations on the machine in which they are executing. To work within this programming constraint for unsigned applets, applet developers must assure that any data or code the unsigned applet may need to access from the server be maintained on the server from which the applet was downloaded, even if the server side architecture would be more optimally configured by having the needed data on different machines. One technique to work around this constraint is to include mechanisms in the server from which the applet was downloaded to access the data from another server. However, in all cases, the unsigned applet cannot interact with servers other than the server from which the applet was downloaded, even if such direct applet-to-server interaction would be the most efficient design.

Still further, if a developer incorporates the RMI framework into their programming environment, then migrating to a different communication protocol that may be more suitable than RMI would prove difficult because the developer would have to recode all the client callers that invoked methods on the RMI stub object to remove the RMI specific exception handling code from such callers and then incorporate any specific error exception handling code required by the new protocol. This process of having to recode all classes and callers that previously used the RMI framework and called the RMI stub file could substantially increase the cost and time commitment needed to switch to a different client-server communication protocol.

For all the above reasons, there is a need in the art for an improved framework and architecture to allow applications on a client to execute method on objects in remote systems.

SUMMARY OF THE DESCRIBED IMPLEMENTATIONS

Provided is a computer implemented method, system, and program for implementing for implementing a remote method call. Remote objects and at least one proxy object are generated, where each proxy object corresponds to one remote object. Data from the remote object is included into the proxy object. A call to a method on one proxy object is processed and the method is executed. The method is one of a plurality of methods, wherein at least one of the plurality of methods comprises a local method including code to perform method operations on the proxy object without going to the remote object and at least one other of the plurality of methods comprises a remote method including code to perform method operations on the remote object.

In further implementations, executing one local method comprises processing data in the proxy object from the remote object, wherein remote object data is returned to the caller from the proxy object.

In still further implementations, a client communication object and a server communication object are generated, wherein the client and server communication objects enable communication therebetween.

Yet further, each client communication object is instantiated from a client communication class and each server communication object is instantiated from a server communication class. In such case, the client and server communication classes implement methods from a communication protocol class.

Yet further, the client communication class includes code to handle error exceptions generated from the communication protocol class in response to executing remote methods on the plurality of proxy objects.

Additionally, the server communication object comprises a first server communication object and the called method comprises a remote method. The client communication object transmits information indicating the called remote method and remote object corresponding to the proxy object subject on which the remote method is called. The first server communication object receives the information indicating the remote method and remote object to execute. The first server communication object further determines whether the indicated remote object is on a second server communication object and transmits information on the indicated remote method and remote object to a second server communication object for execution thereon if the indicated remote object for execution on the second server communication object.

Further implementations provide a method, system, and program for accessing data from remote objects. At least one proxy object is received, where each proxy object corresponds to one remote object, and wherein the proxy object includes data from the remote object. A call to a method on one proxy object is processed. The method is executed. The method is one of a plurality of methods, wherein at least one of the plurality of methods comprises a local method including code to perform method operations on the proxy object without going to the remote object and at least one other of the plurality of methods comprises a remote method including code to perform method operations on the remote object.

The described implementations thus provide techniques for implementing a remote method call in a client server environment that allow for certain information from remote objects to be maintained and accessed locally on the client. Further implementations, provide for locating communication protocol operations in objects separate from the proxy objects so that one communication object handles all communication related operations for multiple proxy objects.

BRIEF DESCRIPTION OF THE DRAWINGS

Referring now to the drawings in which like reference numbers represent corresponding parts throughout:

FIG. 1 illustrates a network environment in which aspects of the invention are implemented;

FIG. 2 illustrates a class schema in accordance with implementations of the invention;

FIGS. 3 a, 3 b, 4, and 5 illustrate logic to instantiate objects used in client server communication implemented in accordance with implementations of the invention;

FIGS. 6, 7, and 8 illustrate logic to execute a method called on a proxy object representing a remote object on a server in accordance with implementations of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following description, reference is made to the accompanying drawings which form a part hereof and which illustrate several embodiments of the present invention. It is understood that other embodiments may be utilized and structural and operational changes may be made without departing from the scope of the present invention.

FIG. 1 illustrates a computing environment in which aspects of the invention are implemented. A client system 2 and servers 4 a, 4 b, and 4 c communicate over a network 5, which may comprise any network known in the art, e.g., a Local Area Network (LAN), Wide Area Network (WAN), Storage Area Network (SAN), the Internet, an Intranet, etc. The client 2 includes a plurality of proxy objects 6 a, 6 b, 6 c, 6 d instantiated for remote objects 8 a, 8 b, 8 c, and 8 d, respectively, on the servers 4 a, 4 b, 4 c. The client 2 and the servers 4 a, 4 b, and 4 c each include an Interface Remote Object Manager (IROM) 10 a, 10 b, 10 c, 10 d, 10 e and the servers 4 a, 4 b, and 4 c further include Remote Object Managers (ROMs) 12 a, 12 b, and 12 c. Each ROM 12 a, 12 b, and 12 c maintains a registry 14 a, 14 b, and 14 c including for each remote object instance subclass, the unique identifier of the remote object subclass instance and a pointer to the instance of the remote object subclass in the server 4 a, 4 b, 4 c. In actual implementations, any number of client and server machines including IROMs and ROMs may be included in the environment. Each device would include a unique instance of one IROM 10 a . . . 10 e for each server to which the device communicates to enable communication with the ROM 12 a, 12 b, 12 c in that device. For instance, server 4 b includes one IROM 10 c instance to enable communication with ROM 12 a in server 4 a and IROM 10 d instance to enable communication with ROM 12 c in server 4 c. The communication links 18 a, 18 b, and 18 c illustrate a communication operation, such as an RMI communication, that is enabled through the ROMs 12 a, 12 b, 12 c and IROMs 10 a . . . 10 e.

In the described implementations, application/callers 16 a, 16 b, and 16 c comprise an application or process in the client 2 that invokes methods on a remote object 8 a, 8 b, 8 c, and 8 d. The application/callers 16 a, 16 b, and 16 c can comprise applets downloaded from over one of the servers 4 a, 4 b, 4 c, or any other application or process known in the art. To accomplish the remote invocation, the application/callers 16 a, 16 b, and 16 c would invoke the methods upon the local proxy object 6 a, 6 b, 6 c, 6 d representing the targeted remote object 8 a, 8 b, 8 c, 8 d. The called proxy object 6 a, 6 b, 6 c, and 6 d would, in turn, pass the method call to the IROM 10 a, which handle the communication with the ROM 12 b and passes the invoked method to the ROM 12 b to invoke the method on the target remote object 8 a, 8 b, 8 c, 8 d if the target remote object is located on the server 4 b or forward the method through the IROM 10 c on the receiving server 4 b to the ROM 12 a or 12 c of the server including the target remote object 8 a, 8 b and 8 d. In certain implementations, the IROM 10 a, 10 b, 10 c, 10 d, 10 e and the ROM 12 a, 12 b, 12 c are instantiated from classes that are subclasses of the specific communication protocol classes that implement the communication, such as the RMI classes required to implement the RMI protocol.

The remote objects 8 a, 8 b, 8 c, and 8 d are objects instantiated from classes implemented in one of the servers 4 a, 4 b, and 4 c. For instance, the A1 and A2 objects 8 a, 8 b are separate objects instantiated from the same class A. FIG. 2 illustrates a class schema of the classes in accordance with implementations of the invention. A RemoteObject class 50 is a superclass including methods that are inherited by other classes participating in the architecture. FIG. 2 shows remote object classes A, B, and C (52 a, 52 b, and 52 c) as subclasses of the RemoteObject class 50. The classes A, B, C would include additional class specific methods to perform the functions defined for the class with respect to the remote objects 8 a, 8 b, 8 c, 8 d. The schema further includes proxy object subclasses 54 a, 54 b, and 54 c that implement the proxy class for each of the remote classes 52 a, 52 b, and 52 c. The proxy object subclasses 54 a, 54 b, 54 c further implement the ProxyInterface class 56, which includes a method (the initializeProxy( ) method discussed below) that is used to create and initialize a proxy object. In this way, the proxy object subclasses 54 a, 54 b, and 54 c inherit all the interfaces and methods of the RemoteObject class 50 and the classes 52 a, 52 b, and 52 c from which the remote objects are instantiated. Each subclass may provide a specific implementation of the methods inherited from the RemoteObject superclass 50.

The RemoteObject class 50 provides attributes and interfaces that must be implemented by remote objects 8 a, 8 b, 8 c, 8 d and proxy objects 6 a, 6 b, 6 c, 6 d to ensure that newly created instances of remote objects 8 a, 8 b, 8 c, 8 d are properly registered in the ROM 12 a, 12 b, 12 c registries 14 a, 14 b, 14 c and have a valid ID used to identify the remote objects 8 a, 8 b, 8 c, 8 d in the registries 14 a, 14 b, 14 c. The subclasses 52 a, 52 b, and 52 c may use their own generation scheme and have their own implementation of the methods of the RemoteObject class 50.

The InterfaceToRemoteObject class 70 provides methods and interfaces to create the IROMs 10 a, 10 b, 10 c, 10 d, 10 e to enable the client 2 to communicate with the server 4 b. The IROM object 10 a, 10 b, 10 c, 10 d, 10 e is responsible for conveying the request to invoke a method against a remote object to the ROM 12 a, 12 b, 12 c including the remote object 8 a, 8 b, 8 c, 8 d; creating or retrieving a proxy object for a specified remote object 8 a, 8 b, 8 c, 8 d; and managing several instances of the IROM on a single client, where each instance enables communication with a different ROM 12 a, 12 b, 12 c at a specified remote location, e.g., server 4 a, 4 b, 4 c. The InterfaceToRemoteObject class 70 may implement the following methods:

-   -   createProxyForRemoteObject( ): includes code to create and         return a proxy for the remote object 8 a, 8 b, 8 c, 8 d. This         method is called with the parameters of the remote location of         the server including the targeted remote object 8 a, 8 b, 8 c, 8         d and the identifier of the remote object, as well as the class         from which the remote object 8 a, 8 b, 8 c, 8 d is instantiated.     -   establishSingleConnection( ): includes code to create an         instance of the IROM 10 a, 10 b, 10 c, 10 d, 10 e object to         enable a connection with one ROM 12 a, 12 b, and 12 c at one         specified with remote location. One instance of the IROM on a         machine 2, 4 a, 4 b, 4 c is instantiated to communicate with the         ROM at a specific remote location. The remote location         information in the serverName attribute of a proxy object 6 a, 6         b, 6 c, 6 d is used to route the proxy's call from IROM 10 a to         ROM 12 b, then to either ROM 12 a or 12 c.     -   invokeOnRemoteCounterpart( ): called with the proxy class name         and the remote method name, ID 60, server name 62, and any         parameters that are provided with the remote method call. This         method is called by the proxy object subclass when the method         called against the proxy object is a remote method to be         executed remotely at the server including the remote object.

In current Java applet implementations, an unsigned applet is restricted to only communicate with a single specified remote location. However, with the described implementations, if the application/caller 16 a, 16 b, 16 c comprises an unsigned applet requesting a remote object that is not on the server from which the applet was launched, then the IROM 10 a on the server 4 b from which the applet was launched would forward the request toward the ROM 12 b, which in turn forwards the request to IROM 10 c or 10 d, which in turn forwards the request to ROM 12 a or 12 c on a different server 4 a, 4 c that includes the targeted remote object. Unsigned applets can only communicate with the server that launched them. In alternative implementation, the application/caller 16 a, 16 b, 16 c may comprise a signed applet.

The RemoteObjectManager class 72 provides methods and interfaces to create the ROMs 12 a, 12 b, 12 c; register remote objects 8 a, 8 b, 8 c, 8 d in the registries 14 a, 14 b, 14 c; invoke methods on registered object 8 a, 8 b, 8 c, 8 d in response to requests from a client; de-register a remote object 8 a, 8 b, 8 c, 8 d; create a proxy object 6 a, 6 b, 6 c, 6 d for a remote object 8 a, 8 b, 8 c, 8 d; and forward a method invocation request to another remote location through the IROM 10 b, 10 c, 10 d, 10 e on the server including the ROM 12 a, 12 b, 12 c. Following are some methods that may be implemented in the RemoteObjectManager class 72:

-   -   assignObjectID( ) includes code to create and assign a new,         unique object identifier (ID) to the created object.     -   addToRegistry( ): includes code to add a new object specified as         a parameter to the registry 14 a, 14 b, 14 c.     -   removeFromRegistry( ): includes code to remove an object         specified as a parameter to the registry 14 a, 14 b, 14 c.     -   createProxyForRemoteObject( ): includes code to create and         return a proxy for the remote object 8 a, 8 b, 8 c, 8 d. This         method is called with the parameters of the remote location of         the server including the targeted remote object 8 a, 8 b, 8 c, 8         d and the identifier of the remote object, as well as the class         from which the remote object 8 a, 8 b, 8 c, 8 d is instantiated.     -   invokeOnRegisteredObject( ): includes code to invoke a specified         remote method against a remote object 8 a, 8 b, 8 c, 8 d having         a unique identifier on a server.

Further, the ROMs 12 a, 12 b, and 12 c calls the initializeProxy( ) method when creating a proxy object 6 a, 6 b, 6 c, 6 d for a specified remote object subclass 52 a, 52 b, 52 c. The implementation of the initializeProxy( ) for a specific subclass may define particular data to copy from the remote object 8 a, 8 b, 8 c, 8 d into the proxy object 6 a, 6 b, 6 c, 6 d. This will allow for certain methods of the class to be serviced from the data maintained in the local proxy object 6 a, 6 b, 6 c, 6 d without having to transfer the method to the server 4 a, 4 b, 4 c to invoke remotely. In this way, the proxy objects 6 a, 6 b, 6 c, 6 d are extended to include specific data from the remote objects 8 a, 8 b, 8 c, 8 d available for local access. This feature of the described implementations reduces network traffic, and hence improves network performance, by reducing the number of transactions over the network through servicing invoked methods locally from the data included in the proxy objects 6 a, 6 b, 6 c, 6 d.

FIGS. 3 a, b and 4–7 illustrate logic implemented by the methods in the above described classes to execute methods called on proxy objects in a client-server architecture. FIG. 3 a illustrates logic implemented in the methods of the RemoteObjectManager class 72 to instantiate a singleton instance of the ROM 12 a, 12 b, 12 c on the server 4 a, 4 b, 4 c to manage remote calls. Control begins at block 100 upon receiving a call to getSingleton independently on each server 4 a, 4 b, 4 c, which is a method of the RemoteObjectManager class 72, to create a single instance of the Rom 12 a, 12 b, 12 c on the server 4 a, 4 b, 4 c from which the call is made. If (at block 102) there is already a ROM 12 a, 12 b, 12 c on the server, then the ROM 12 a, 12 b, 12 c is returned (at block 104). Otherwise, if there is no registered ROM, then a method would be called (at block 106) to create the ROM object and create (at block 108) the ROM registry 14 a, 14 b, 14 c. The ROM object is then added (at block 110) to the RMI registry of the server 4 a, 4 b, 4 c on which the ROM was created. In alternative non-RMI implementations, other registration techniques may be used.

After a singleton instance of the ROM 12 a, 12 b, 12 c is instantiated on the server 4 a, 4 b, 4 c, then remote objects 8 a, 8 b, 8 c, 8 d may be instantiated to enable calls from remote clients. FIG. 3 b illustrates logic implemented in the RemoteObject( ) constructor of the RemoteObject class 50, which is implemented in the remote object subclasses 52 a, 52 b, 52 c and used to instantiate a remote object 8 a, 8 b, 8 c, 8 d. At block 150, a call is made on the server 4 a, 4 b, 4 c to the constructor RemoteObject( ) for one remote object subclass 52 a, 52 b, 52 c and a remote object 8 a, 8 b, 8 c, 8 d for the subclass 52 a, 52 b, 52 c is created (at block 152). A unique identifier (ID) is assigned (at block 154) the created remote object and the server name of the host server is stored (at block 156) in the created remote object. An ID and a reference to the new object are added (at block 158) to the registry 14 a, 14 b, 14 c.

The result of executing methods implementing the logic of FIGS. 3 a and 3 b is a ROM 12 a, 12 b, 12 c and instantiated remote objects available on the server 4 a, 4 b, 4 c and capable of receiving calls initiated at a remote client.

FIG. 4 illustrates logic implemented in the methods of the InterfaceToRemote Object 70 class to instantiate and use the IROM 10 a, 10 b, 10 c, 10 d. At block 200, a call to the establishNewConnection( ) is made to instantiate a IROM for a specified remote location (e.g., server 4 a, 4 b, 4 c). In response, a singleton instance of the IROM 10 a is created for the specified remote location. In this way, any system in the framework may access one IROM 10 a to communicate with a particular remote location.

After instantiating the IROM 10 a, application/callers 16 a, 16 b, 16 c may then perform actions with respect to proxy objects. At block 204, a call to the createProxyForRemoteObject( ) is received for a specified proxy object instantiated with the name of the proxy subclass 54 a, 54 b, 54 c. In response, the IROM object 10 a uses the RMI protocol to transmit (at block 206) the createProxyForRemoteObject( ) method along with the parameters to the ROM 12 b at the specified remote location. At block 208, the IROM object 10 a receives the returned proxy object 6 a, 6 b, 6 c, 6 d in response to the transmitted call to the createProxyForRemoteObject( ). The IROM 10 a then returns (at block 210) the received proxy object 6 a, 6 b, 6 c, 6 d to the caller 16 a, 16 b, 16 c that initiated the call to create the proxy object. Once returned the application/callers 16 a, 16 b, 16 c can call methods on the proxy object 6 a, 6 b, 6 c, 6 d when intending to perform methods on the corresponding remote object 8 a, 8 b, 8 c, 8 d on a remote server 4 a, 4 b, 4 c.

FIG. 5 illustrates logic implemented in the methods of the RemoteObject Manager 72 class to handle a call (at block 250) to the createProxyForRemote Object( ), having a specified remote object name at a specified remote location and specified proxy subclass 54 a, 54 b, 54 n. If (at block 252) the location of the receiving ROM is the same as the location specified in the call and if (at block 254) the remote object ID specified in the call is listed in the registry 14 b, then the ROM 12 b creates (at block 258) an empty proxy object having the ID of the remote object indicated in the call and the serverName of the remote location specified in the call. The ROM 12 b further calls (at block 260) the initializeProxy( ) method for the proxy subclass 54 a, 54 b, 54 c specified in the call as a parameter. The initializeProxy( ) method includes code to initialize the created proxy object 6 a, 6 b, 6 c, 6 d with data from the remote object 8 a, 8 b, 8 c, 8 d the proxy represents. Each proxy subclass 54 a, 54 b, 54 c may include different implementations of the initializeProxy( ) method. Further, the initializeProxy( ) method may add data from certain fields in the actual remote object 8 a, 8 b, 8 c, 8 d into the proxy object 6 a, 6 b, 6 c, 6 d to enable access of that data from the proxy object 6 a, 6 b, 6 c, 6 d on the client 2. In this way, methods called on the proxy object 6 a, 6 b, 6 c, 6 d on the client may access data from the proxy object in order to avoid the need to make a remote call over the network to perform on the remote object. Network traffic is reduced and network performance enhanced by performing certain calls locally instead of remotely. Developers may fine tune the initializeProxy( ) method to determine an optimal number of fields to include in the proxy object to avoid remote calls over the network and the servicing of methods from the data in the proxy object 6 a, 6 b, 6 c, 6 d.

After the proxy object 6 a, 6 b, 6 c, 6 d is created, the ROM 12 b returns the proxy object to the IROM 10 a that transmitted the call to create the proxy object. If (at block 254) there is no entry in the registry 14 b for the remote object specified in the createProxyForRemoteObject( ) call, then the ROM 12 b returns (at block 262) an error to the IROM 10 a that the remote object specified in the create proxy call does not exist on the server 4 a, 4 b, 4 c. If (at block 252) the location of the ROM 10 a receiving the create proxy call is not the same as the remote location parameter in the call, then the receiving ROM 12 b determines (at block 264) the IROM 10 b or 10 d instantiated for communication with the specified remote location. The receiving ROM 10 a then forwards (at block 266) the call to the determined IROM 10 b or 10 d on a different sever 4 a, 4 c to which the createProxyForRemoteObject( ) method is directed. The ROM 12 a or 12 c upon receiving the forwarded call would then proceed to block 250 in FIG. 5 to process the call. This forwarding of remote calls allows an applet downloaded from one server, e.g., server 4 b, to communicate or perform remote calls on remote objects in other servers, e.g., servers 4 a and 4 c. Although the current applet framework only allows communication communicates directly with one server 4 b (the server from which the applet was launched), the applet may invoke calls on remote objects on other servers because the ROM 12 b in the launching server 4 b would forward the call to create the proxy object to the other server 4 a or 4 c.

FIG. 6 illustrates logic implemented in the methods of the proxy subclasses 54 a, 54 b, 54 c to handle calls made against the proxy objects 6 a, 6 b, 6 c, 6 d. Control begins at block 280 upon receiving a call to a method in the proxy object subclass 54 a, 54 b, 54 c on the proxy object. As discussed, the proxy subclasses 54 a, 54 b, 54 c are subclasses of the remote method classes 52 a, 52 b, 52 c and would implement the methods of the remote method classes 52 a, 52 b, 52 c with the logic of FIG. 6 to allow for execution of the method locally on the proxy object 6 a, 6 b, 6 c, 6 d or remotely on the remote object 8 a, 8 b, 8 c, 8 d. If (at block 282) the method is coded for remote execution, then the invokeOnRemoteCounterpart( ) method call is made (at block 286) to the IROM 10 a with the proxy object name and the method name, and any method parameters. If (at block 282) the method is implemented locally, then the method is called (at block 288) on the proxy object and executed locally on the client 2. The data is then returned (at block 290) the application/caller 16 a, 16 b, 16 c on the client 2.

FIG. 7 illustrates logic implemented in the invokeOnRemoteCounterpart( ) method of the InterfaceToRemoteObject class 70. Control begins at block 300 with one IROM 10 a receiving a call to the invokeOnRemoteCounterpart( ) with a specified remote location, remote object ID, and proxy object class 54 a, 54 b, 54 c. In response, the called IROM 10 a builds (at block 302) a call to the invokeOnRegisteredObject( ) method of the RemoteObjectManager class 72 with the remote location name, method name called, and ID of the remote object instance. This constructed call is then packaged and methods from the RMI class, or any other communication protocol class, that the IROM inherits, are called (at block 304) to transfer the invokeOnRegisteredObject( ) to the ROM 12 b at the server, e.g. sever 4 b, that launched the applet.

FIG. 8 illustrates logic implemented in the invokeOnRegisteredObject( ) method to handle the remote call at the remote location. Control begins (at block 330) with the ROM 12 a receiving the call to the invokeOnRegisteredObject( ) method with the remote object ID, remote location name, and method name. If (at block 332) the location of the receiving ROM 12 a is not the same as the remote location specified in the call, then the receiving ROM 12 a determines (at block 334) the IROM 10 c for the specified remote location and forwards (at block 336) the call to the determined IROM 10 c to, in turn, forward (at block 336) the call to the ROM 10 b or 10 d at the specified server 4 a or 4 c (remote location). Again this feature allows an unsigned applet, which is restricted to only communicating with the server from which the applet was launched, from making a call to an object on a different server. If (at block 338) the ID of the targeted remote object is not listed in the registry 14 b of the receiving ROM 12 b, then an error is returned (at block 340) to the calling IROM 10 a indicating that the specified remote object does not exist at the specified remote location 4 b. If the ID of the targeted remote object 8 c is in fact listed in the registry 14 b, then the ROM 12 b invokes (at block 342) the method specified in the call on the specified remote object 10 c and returns any results, if any, from the method call to the initiating IROM 10 a. In Java implementations, the ROM 12 b may use Java reflection to construct the method call against the remote object 10 c from the method name specified in the invokeOnRegisteredObject( ) call.

With the described class architecture for implementing remote calls, all the communication protocol specific methods, e.g., the RMI classes, are performed by the IROM and ROM objects at a level separate from the actual proxy and remote objects. The IROM class would further include RMI specific exception handling methods to handle any errors returned by the ROM when executing the remote call. The proxy subclasses 54 a, 54 b, 54 c thus do not have to implement the communication protocol, e.g., RMI, specific classes because all communication and exception handling is performed by the IROM object. In this way, a developer may change the communication protocol, e.g., SOAP, used by altering the RemoteObject Manager 72 and InterfaceToRemoteObject 70 classes to implement the methods of the new communication protocol. The proxy objects and remote objects do not have to be altered because any communication protocol related operations are handled at the ROM/IROM level. Thus, remote objects and proxy objects may be reused in an alternative communication protocol environment.

With the described implementations, the proxy objects may include the data for the attributes of the remote object. This allows certain remote object subclass 52 a, 52 b, 52 c methods to be executed locally on the client 2 because the attributes manipulated and returned by the method calls are maintained locally in the local proxy object 6 a, 6 b, 6 c, 6 d. Allowing for certain methods to be executed locally, reduces network traffic and improves network bandwidth by avoiding network traffic related to a remote call.

Additional Implementation Details

The above described method, apparatus or article of manufacture for implementing a client-server object may be implemented using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” as used herein refers to code or logic implemented in hardware logic (e.g., an integrated circuit chip, Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), etc.) or a computer readable medium (e.g., magnetic storage medium (e.g., hard disk drives, floppy disks, tape, etc.), optical storage (CD-ROMs, optical disks, etc.), volatile and non-volatile memory devices (e.g., EEPROMs, ROMs, PROMs, RAMs, DRAMs, SRAMs, firmware, programmable logic, etc.). Code in the computer readable medium is accessed and executed by a processor. The code in which preferred embodiments of the configuration discovery tool are implemented may further be accessible through a transmission media or from a file server over a network. In such cases, the article of manufacture in which the code is implemented may comprise a transmission media, such as a network transmission line, wireless transmission media, signals propagating through space, radio waves, infrared signals, etc. Of course, those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention, and that the article of manufacture may comprise any information bearing medium known in the art.

In the described implementations, certain operations were describe as performed in specific classes within the architecture. Certain of the operations may be implemented in methods of other of the described classes. Additional classes may be provided and the methods and operation described herein may be performed in such additional classes. The classes described herein may include additional methods to implement the remote call architecture. Further, the described remote object and proxy subclasses may include application specific methods to perform specific tasks for which the remote objects and proxy subclasses were implemented, such as managing remote devices, application programs, etc.

In the described implementations, an IROM and corresponding ROM objects were located on different machines to allow for client-server communication over a network. In alternative implementations, the IROM and corresponding ROM objects may be implemented on the same machine, such that the IROM and ROM objects enable communication between a proxy object and remote object on the same machine. In this way, the network protocol, such as RMI, is used to allow objects to communication with remote objects within a same machine.

In described implementations, the classes were implemented using the Java programming language and the Java RMI communication protocol was used. Additionally, the classes may be implemented in other object oriented programming languages, such as C++, Smalltalk, etc. Further, the ROM and IROM may utilize alternative communication protocols to handle the remote calls, such as SOAP, Common Object Request Broker Architecture (CORBA), Remote Procedure Call (RPC), Distributed Relational Database Architecture (DRDA), etc. In implementations using alternative communication protocols for the remote communications, the IROM and ROM would implement the communication specific related methods.

FIGS. 3 a, 3 b and 4–7 illustrate specific operations occurring in a particular order. In alternative embodiments, certain of the logic operations may be performed in a different order, modified or removed and still implement preferred embodiments of the present invention. Moreover, steps may be added to the above described logic and still conform to the preferred embodiments. Further, operations described herein may occur sequentially or certain operations may be processed in parallel.

The foregoing description of various implementations of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.

** Java is a trademark of Sun Microsystems, Inc. 

1. A method for implementing a remote method call, comprising: generating remote objects; generating a client communication object; and generating a server communication object, wherein the client and server communication objects enable communication between the client and the server communication objects; generating at least one proxy object, where each proxy object corresponds to one remote object; including data from the remote object into the proxy object; and processing a call to a method on one proxy object by: (i) determining whether the method is implemented locally; (ii) executing a local method including code to perform method operations on the proxy object without going to the remote object, in response to determining that the method is implemented locally; and (iii) executing a remote method including code to perform method operations on the remote object, in response to determining that the method is not implemented locally, by: (a) passing the remote method to the client communication object; (b) transmitting to the server communication object, with the client communication object, an invocation method specifying the remote method on one specified remote object to the server communication object, wherein the server communication object is a first server communication object; (c) determining, with the first server communication object, whether the remote object specified in the received invocation method is accessible through a second server communication object; and (d) transmitting, with the first server communication object, the received invocation method to the second server communication object to execute against the specified remote object, (e) executing, with the second server communication object, the remote method specified in the invocation method ante specified remote object; and (f) returning, with the second server communication object, data generated in response to execution of the remote method on the specified remote object to the client communication object.
 2. The method of claim 1, wherein executing one local method comprises processing data in the proxy object from the remote object, wherein remote object data is returned to a caller from the proxy object, wherein the remote object data is the data from the remote object included into the proxy object.
 3. The method of claim 1, wherein generating the at least one proxy object further comprises: transmitting a request to instantiate a proxy object for one specified remote object and a specified proxy class; generating the proxy object in response to the request; calling an initialization method from the specified proxy class to add data from the specified remote object to the generated proxy object; and returning the generated proxy object for use in accessing the remote object.
 4. The method of claim 3, wherein the proxy object class is a subclass of a remote object class, wherein the remote objects are instantiated from at least one remote object class, and wherein each remote object class is a subclass of a communication protocol class providing methods and attributes.
 5. The method of claim 1, wherein one client communication object is generated for each server communication object to which the client communication object will communicate.
 6. The method of claim 1, wherein each client communication object is instantiated from a client communication class and wherein each server communication object is instantiated from a server communication class, wherein the client and server communication classes implement methods from a communication protocol class.
 7. The method of claim 6, wherein the communication protocol class comprises a Java Remote Method Invocation (RML) classes.
 8. The method of claim 6, wherein the client communication object manages communication with the server communication object for a plurality of proxy objects on which remote methods are invoked to execute on corresponding remote objects.
 9. The method of claim 6, wherein the client communication class includes code to handle error exceptions generated from the communication protocol class in response to executing remote methods on the plurality of proxy objects.
 10. The method of claim 1, wherein the client communication class includes code to handle exceptions related to communication between the client communication object and the server communication object.
 11. The method of claim 1, wherein the remote object and proxy object are implemented in a same computer device, and wherein the local and remote method perform their operations on the same computer device.
 12. The method of claim 11, wherein the server comprises a first server and wherein generating the at least one proxy object further comprises: receiving, with the first server, a method to instantiate a proxy object for a specified remote object; determining, at the first server, whether the specified remote object is on a second server; transmitting, with the first server, the method to instantiate the proxy object to the second server for execution thereon if the remote object is located on the second server.
 13. The method of claim 12, further comprising: returning, with the second server, the instantiated proxy object to the first server to return to the client.
 14. The method of claim 1, wherein the remote objects are generated on a server system, wherein the call to the method on one proxy object occurs on a client system, wherein the server and client systems communicate over a network, wherein the local method includes code to perform the method operation on the proxy object on the client without going to the server and the remote method includes code to execute remotely on the server to perform method operations on the remote object on the server.
 15. The method of claim 14, wherein the server comprises a first server and wherein the called method comprises a remote method, further comprising: transmitting, with the client, information indicating the called remote method and remote object corresponding to the proxy object subject on which the remote method is called; receiving, with the first server, the information indicating the remote method and remote object to execute; determining, at the first server, whether the indicated remote object is on a second server; and transmitting information on the indicated remote method and remote object to a second server for execution thereon if the indicated remote object for execution on the second server.
 16. The method of claim 15, further comprising: launching, with the client, an applet downloaded from the first server, wherein the applet calls the remote method on the proxy object corresponding to the remote object on the second server, and wherein the applet communicates the information indicating the remote method and remote object to the first server.
 17. A system for implementing a remote method call, comprising: means for generating remote objects; means for generating a client communication object; and means for generating a server communication object, wherein the client and server communication objects enable communication between the client and the server communication objects; means for generating at least one proxy object, where each proxy object corresponds to one remote object; means for including data from the remote object into the proxy object; and means for processing a call to a method on one proxy object by: (i) determining whether the method is implemented locally; (ii) executing a local method including code to perform method operations on the proxy object without going to the remote object in response to determining that the method is implemented locally; and (iii) executing a remote method including code to perform method operations on the remote object, in response to determining that the method is not implemented locally, by; (a) passing the remote method to the client communication object; (b) transmitting to the server communication object, with the client communication object, an invocation method specifying the remote method on one specified remote object to the server communication object, wherein the server communication object is a first server communication object; (c) determining, with the first server communication object, whether the remote object specified in the received invocation method is accessible through a second server communication object; and (d) transmitting, with the first server communication object, the received invocation method to the second server communication object to execute against the specified remote object, (e) executing, with the second server communication object, the remote method specified in the invocation method on the specified remote object; and (f) returning, with the second server communication object, data generate in response to execution of the remote method on the specified remote object to the client communication object.
 18. The system of claim 17, wherein the means for executing one local method comprises processing data in the proxy object from the remote object, wherein remote object data is returned to a caller from the proxy object, wherein the remote object data is the data from the remote object included into the proxy object.
 19. The system of claim 17, wherein the means for generating the at least one proxy object further performs: transmitting a request to instantiate a proxy object for one specified remote object and a specified proxy class; generating the proxy object in response to the request; calling an initialization method from the specified proxy class to add data from the specified remote object to the generated proxy object; and returning the generated proxy object for use in accessing the remote object.
 20. The system of claim 19, wherein the proxy object class is a subclass of the a remote object class, wherein the remote objects are instantiated from at least one remote object class, and wherein each remote object class is a subclass of a communication protocol class providing methods and attributes.
 21. The system of claim 17 wherein one client communication object is generated for each server communication object to which the client communication object will communicate.
 22. The system of claim 17, wherein each client communication object is instantiated from a client communication class and wherein each server communication object is instantiated from a server communication class, wherein the client and server communication classes implement methods from a communication protocol class.
 23. The system of claim 22, wherein the communication protocol class comprises a Java Remote Method Invocation (RMI) classes.
 24. The system of claim 22, wherein the client communication object manages communication with the server communication object for a plurality of proxy objects on which remote methods are invoked to execute on corresponding remote objects.
 25. The system of claim 22, wherein the client communication class includes code to handle error exceptions generated from the communication protocol class in response to executing remote methods on the plurality of proxy objects.
 26. The system of claim 17, wherein the client communication class includes code to handle exceptions related to communication between the client communication object and the server communication object.
 27. The system of claim 17, further comprising: a computer device, wherein the remote object and proxy object are implemented on the computer device.
 28. The system of claim 17, further comprising: a client system; a server system; a network for enabling communication between the client and server system, wherein the remote objects are generated on the server system, wherein the call to the method on one proxy object occurs on a client system, wherein the local methods include code to perform the method operation on the proxy object on the client system without going to the server system and the remote methods include code to execute remotely on the server to perform method operations on the remote object on the server.
 29. An article of manufacture including code for implementing a remote method call, wherein the code causes operations to be performed comprising: generating remote objects; generating a client communication object; and generating a server communication object, wherein the client and server communication object enable communication between the client and the server communication objects; generating at least one proxy object, where each proxy object corresponds to one remote object; including data from the remote object into the proxy object; and processing a call to a method on one proxy object by: (i) determining whether the method is implemented locally; (ii) executing a local method including code to perform method operations on the proxy object without going to the remote object, in response to determining that the method is implemented locally; and (iii) executing a remote method including code to perform method operations on the remote object, in response to determining that the method is not implemented locally, by; (a) passing the remote method to the client communication object; (b) transmitting to the server communication object, with the client communication object, an invocation method specifying the remote method on one specified remote object to the server communication object, wherein the server communication object is a first server communication object; (c) determining, with the first server communication object, whether the remote object specified in the received invocation method is accessible through a second server communication object; and (d) transmitting, with the first server communication object, the received invocation method to the second server communication object to execute against the specified remote object, (e) executing, with the second server communication object, the remote method specified in the invocation method on the specified remote object; and (f) returning, with the second server communication object, data generated in response to execution of the remote method on the specified remote object to the client communication object.
 30. The article of manufacture of claim 29, wherein executing one local method comprises processing data in the proxy object from the remote object, wherein remote object data is returned to a caller from the proxy object, wherein the remote object data is the data from the remote object included into the proxy object.
 31. The article of manufacture of claim 29, wherein generating the at least one proxy object further comprises: transmitting a request to instantiate a proxy object for one specified remote object and a specified proxy class; generating the proxy object in response to the request; calling an initialization method from the specified proxy class to add data from the specified remote object to the generated proxy object; and returning the generated proxy object for use in accessing the remote object.
 32. The article of manufacture of claim 31, wherein the proxy object class is a subclass of a remote object class, wherein the remote objects are instantiated from at least one remote object class, and wherein each remote object class is a subclass of a communication protocol class providing methods and attributes.
 33. The article of manufacture of claim 29, wherein one client communication object is generated for each server communication object to which the client communication object will communicate.
 34. The article of manufacture of claim 29, wherein each client communication object is instantiated from a client communication class and wherein each server communication object is instantiated from a server communication class, wherein the client and server communication classes implement methods from a communication protocol class.
 35. The article of manufacture of claim 34, wherein the communication protocol class comprises a Java Remote Method Invocation (RMI) classes.
 36. The article of manufacture of claim 34, wherein the client communication object manages communication with the server communication object for a plurality of proxy objects on which remote methods are invoked to execute on corresponding remote objects.
 37. The article of manufacture of claim 34, wherein the client communication class includes code to handle error exceptions generated from the communication protocol class in response to executing remote methods on the plurality of proxy objects.
 38. The article of manufacture of claim 29, wherein the client communication class includes code to handle exceptions related to communication between the client communication object and the server communication object. 